package com.wmd.validation.annotation;

import com.wmd.validation.validations.DateCompareValidator;
import com.wmd.validation.validations.DateTimeValidator;

import javax.validation.Constraint;
import javax.validation.Payload;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
import java.time.LocalDateTime;

/**
 * @projectName:DocumentLibrary
 * @packageName:com.wmd.validation.annotation
 * @Description:TODO
 * @Author:luyincheng
 * @CreateDate: 2023/9/814:49
 */
@Target({ElementType.FIELD, ElementType.PARAMETER})
@Retention(RetentionPolicy.RUNTIME)
@Constraint(validatedBy = DateCompareValidator.class)
public @interface DateCompare {

    String message() default "日期错误";

    String compareTime() default "";

    boolean greater() default true;

    Class<?>[] groups() default {};

    Class<? extends Payload>[] payload() default {};
}
